tinymce.PluginManager.add("formula", function(e, n) {
    function t() {
        function t() {
            var e = '<iframe name="orhonlmsFormulaIfr" id="orhonlmsFormulaIfr" src="' + n + "/formula/index.html?" + (new Date).getTime() + '" scrolling="no" frameborder="0"></iframe>';
            return e
        }
        e.dom;
        window.FORMULA_EDITOR_FORMULAR = e, win = e.windowManager.open({
            title: "Formula",
            width: 822,
            height: 382,
            html: t(),
            buttons: [{
                text: "Cancel",
                onclick: function() {
                    this.parent().parent().close()
                }
            }, {
                text: "Insert Formula",
                subtype: "primary",
                onclick: function() {
                    var n = this;
                    window.frames.orhonlmsFormulaIfr && window.frames.orhonlmsFormulaIfr.getData ? window.frames.orhonlmsFormulaIfr.getData(function(t, a) {
                        t && e.insertContent('<img src="' + t + '" data-latex="' + a + '"/>'), n.parent().parent().close()
                    }) : n.parent().parent().close()
                }
            }]
        })
    }
    e.addButton("formula", {
        image: n + "/icon.png",
        tooltip: "插入公式",
        onclick: t
    }), e.addMenuItem("formula", {
        image: n + "/icon.png",
        text: "Insert Formula",
        onclick: t,
        context: "insert",
        prependToContext: !0
    })
});